/*
 * GLShader.cpp
 *
 *  Created on: 2012/08/12
 *      Author: owner
 */

#include "GLShader.h"

GLShader::GLShader( GLint type ) {
	ref = glCreateShader( type );
}

GLShader::~GLShader() {
	glDeleteShader( ref );
	ref = NULL;
}

void GLShader::setSource( const char* source ) {
	glShaderSource( ref, 1, &source, NULL );
}

void GLShader::compile() {
	glCompileShader( ref );

}
